<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterLocationTableAddField13PgZjXz extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('open_shop_location', function (Blueprint $table) {
            $table->unsignedTinyInteger('locationType')->default(0)->after("shopType")->comment("0 未选择 1现场评估 2远程评估");
            $table->unsignedTinyInteger('depositMonth')->default(0)->after("shopType")->comment("押金月数");
            $table->unsignedTinyInteger('payMonth')->default(0)->after("shopType")->comment("支付月数");
            $table->unsignedTinyInteger('isLocationSelf')->default(0)->after("shopType")->comment("是否自带选址");
            $table->unsignedInteger('averageDaily')->default(0)->after("shopType")->comment("日均收益 分");
            $table->unsignedInteger('averageDailyBreak')->default(0)->after("shopType")->comment("日均保本点 分");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('open_shop_location', function (Blueprint $table) {
            $table->dropColumn('locationType');
            $table->dropColumn('depositMonth');
            $table->dropColumn('payMonth');
            $table->dropColumn('isLocationSelf');
            $table->dropColumn('averageDaily');
            $table->dropColumn('averageDailyBreak');
        });
    }
}
